Florian D. Schneider
27.08.2014
| filename | last updated |
|---|---|
| project.c | 01.08.2014 |
| filename | last updated |
|---|---|
| project.c | 01.08.2014 |
| project_v0.1.c | 02.08.2014 |
| filename | last updated |
|---|---|
| project.c | 01.08.2014 |
| project_v0.1.c | 02.08.2014 |
| project_v0.2.c | 03.08.2014 |
| project_v0.21.c | 04.08.2014 |
| project_v0.2_sonia.c | 04.08.2014 |
| filename | last updated |
|---|---|
| project.c | 01.08.2014 |
| project_v0.1.c | 02.08.2014 |
| project_v0.2.c | 03.08.2014 |
| project_v0.21.c | 04.08.2014 |
| project_v0.2_sonia.c | 04.08.2014 |
| project_v0.21_s.c | 05.08.2014 |
| filename | last updated |
|---|---|
| project.c | 01.08.2014 |
| project_v0.1.c | 02.08.2014 |
| project_v0.21.c | 04.08.2014 |
| project_v0.2_sonia.c | 04.08.2014 |
| project_v0.21_s.c | 05.08.2014 |
| project_v0.2.c | 07.08.2014 |
$ git push origin master
| filename | last updated |
|---|---|
| .git | 01.08.2014 |
| project.c | 01.08.2014 |
| filename | last updated |
|---|---|
| .git | 02.08.2014 |
| project.c | 02.08.2014 |
| filename | last updated |
|---|---|
| .git | 03.08.2014 |
| project.c | 03.08.2014 |
Classic filesystems:
git:
{demo}
#5b26a8379e0f1ea6dd87916d738a49d118361676
Types of pointers:
a directory with files
showing the accumulated commits at 'HEAD'
And this is how 'time travelling' works:
you can move HEAD to branches
And this is how 'time travelling' works:
you can move HEAD to tags
And this is how 'time travelling' works:
you can move HEAD back to 'master' branch
And this is how 'time travelling' works:
you can move HEAD to any commit (per hash-tag)
What you need to learn:
open a terminal
$
Create a new folder.
$ mkdir test
$ cd test
$
Initialise a git repository.
$ mkdir test
$ cd test
$ git init
Initialized empty Git repository ...
$
check the status!
$ git status
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
test.txt
nothing added to commit but untracked files present (use "git add" to track)
This is a two step process:
staging files for next commit
$ git add test.txt
commit to repository
$ git commit -m "edit test.txt: fix #23"
-m "..." check status again!
$ git status
On branch master
nothing to commit, working directory clean
have a look at your repository tree!
$ git log
commit a9b0697265feb5013eced9c1befb9a10a94a66cb
Author: Florian Schneider <florian.schneider@univ-montp2.fr>
Date: Fri Nov 21 16:30:53 2014 +0100
edit test.txt
(repeat 2 & 3 a couple of times! use git status and git log!)
in same repository:
git log Terminal:
$ git tag -a v1.0 -m "first version of project"
$
continue work:
$ git tag
v1.0
$
$ git tag
v1.0
$ git checkout v1.0
$
look at your files!
$ git tag
v1.0
$ git checkout v1.0
$ git checkout master
$
look at your files!
what you learned:
log and statusand many more: http://git-scm.com/downloads/guis
git clone https://github.com/cascade-wp6/git_intro.git
git pull origin master
git push origin master
more info: http://git-scm.com/book
https://gitlab.info-ufr.univ-montp2.fr/
Bitbucket (free private for small teams)
GitLab Cloud (unlimited free private)
self-hosted git server, and many more
git clone https://github.com/user/repoWhy?